home *** CD-ROM | disk | FTP | other *** search
/ Die Ultimative Software-P…i Collection 1996 & 1997 / Die Ultimative Software-Pakete CD-ROM fur Atari Collection 1996 & 1997.iso / i / internet / software / lprsr / tstwrt.s < prev   
Encoding:
Text File  |  1993-03-03  |  2.5 KB  |  126 lines

  1. **********************************************************************
  2. *       program netspl.s         residenter modul zur umlenkung      *
  3. *       pm 10/92                 des gemdostraps 1. implementiert    *
  4. *       (pure-c)                 druck-dämon für *.pco-files.        *
  5. **********************************************************************
  6.  
  7.         export    oldgem
  8.         export    grpgem
  9.         export  tabstart
  10.         export  tabend
  11.         export  tab
  12.         export    grptrp
  13.         export    oldt5
  14.         import    show        
  15.         .text
  16.  
  17. *-------------------------------*
  18. *    residenter programmteil    *
  19. *-------------------------------*
  20.         dc.b "XBRANSPO"
  21.  
  22. oldgem: dc.l    0
  23. oldt5:    dc.l    0
  24. file:    dc.w    0
  25.        
  26. grptrp: tst.w    flag
  27.         bne        dotrp
  28.         move.l    a1,-(a7)
  29.         move.l    tab,a1
  30.  
  31.         move.l    $4ba,(a1)+
  32.         move.w    #5,(a1)+
  33.         move.l    6(a7),(a1)+
  34.         clr.l    (a1)+
  35.         clr.l   (a1)+
  36.         cmp.l    #tabend,a1
  37.         blo        nixt
  38.         move.l    #tabstart,a1
  39. nixt:
  40.         move.l    a1,tab
  41.         move.l    (a7)+,a1
  42. dotrp:
  43.         move.l    oldt5,-(a7)
  44.         rts
  45.         
  46. grpgem: 
  47.         tst.w     flag
  48.         bne        dogem
  49.         move    (a7),d0          * test user/super mode
  50.         btst    #13,d0
  51.         bne.b   sup
  52.         move.l  usp,a0
  53.         bra.b   tst
  54.  
  55. sup:    lea     6(a7),a0
  56. tst: 
  57.         cmp.w   #$40,(a0)      * is it Fwrite
  58.         beq.b   dowr
  59.         cmp.w   #632,(a0)      * tcpread
  60.         beq.b    dord
  61.         cmp.w   #635,(a0)      * tcpstat
  62.         beq.b    dord
  63.         cmp.w   #$42,(a0)      * Fseek
  64.         beq.b    dord
  65.         bra.b   tryclose
  66.  
  67. dowr:
  68.         move.w    2(a0),file
  69. dord:        
  70.         move.l    tab,a1
  71.         move.l    $4ba,(a1)+
  72.         move.w    0(a0),(a1)+
  73.         move.l    4(a0),(a1)+
  74.         move.l    8(a0),(a1)+
  75.         clr.l    (a1)+
  76.         move.l    a1,tab
  77.         move.l    2(a7),saveret
  78.         move.l    #myret,2(a7)
  79.         move.l    oldgem,-(a7)
  80.         rts
  81.         
  82. myret:
  83.         move.l    tab,a1
  84.         move.l    d0,-4(a1)
  85.         cmp.l    #tabend,a1
  86.         bne        nix
  87.         move.l    #tabstart,a1
  88. nix:
  89.         move.l    a1,tab
  90.         move.l    saveret,-(a7)
  91.         rts
  92.         
  93. dogem:  move.l  oldgem,-(a7)
  94.         rts
  95. tryclose:
  96.         tst.w    flag
  97.         bne        dogem
  98.         cmp.w    #$3e,(a0)
  99.         bne        dogem
  100.         move.w    file,d0
  101.         cmp        2(a0),d0
  102.         bne        dogem
  103.         move.w    #1,flag
  104.         movem.l    d2-a6,-(a7)
  105.         jsr        show
  106.         movem.l    (a7)+,d2-a6
  107.         clr.w    flag
  108.         clr.w    file
  109.         bra dogem
  110.         
  111.         .data
  112.  
  113. tab:    dc.l    tabstart
  114. flag:    dc.w    0
  115. saveret:    dc.l 0
  116.  
  117.         .bss
  118.         
  119. tabstart:
  120.         ds.w    4500
  121. tabend:
  122.         ds.w    100
  123.         
  124.         end
  125.  
  126.